<h1>Delayed::Jobs</h1>

<table id="delayed-jobs">
  <thead>
    <tr>
      <th>ID</th>
      <th>Priority</th>
      <th>Attempts</th>
      <th>Last error</th>
      <th>Run at</th>
      <th>Locked at</th>
      <th>Failed at</th>
      <th>Locked by</th>
      <th>Created at</th>
      <th>Updated at</th>
      <th>Delete</th>
    </tr>
  </thead>
  <tbody>
    <% @delayed_jobs.each do |job| %>
    <tr>
      <td><%= h(job.id) %></td>
      <td><%= h(job.priority) %></td>
      <td><%= h(job.attempts) %></td>
      <td><%= h(job.last_error) %></td>
      <td><%= h(format_short_datetime(job.run_at)) %></td>
      <td><%= h(format_short_datetime(job.locked_at)) %></td>
      <td><%= h(format_short_datetime(job.failed_at)) %></td>
      <td><%= h(job.locked_by) %></td>
      <td><%= h(format_short_datetime(job.created_at)) %></td>
      <td><%= h(format_short_datetime(job.updated_at)) %></td>
      <td><%= button_to("Delete", admin_delayed_job_path(job), :method =>
      :delete, :confirm => "Are you sure?") %>
    </tr>
    <% end %>
  </tbody>
</table>

